<include file="Public:_head" />
<include file="Public:left" />

	<div id="neirong">
	  <h2 class="lm_title">DIY<span>企业的私人定制！</span> </h2>
	<div id="DIY_website">
		 <h3 class="subTitle"><img src="com_statics/images/icon_11.gif" alt="图片描述" />DIY微官网<span>通过DIY，可以完美的展现贵公司的企业形象！</span></h3>
    
		<div class="pagePhoto">
			<iframe id="frame" frameborder="no" border="0" scrolling="no" width="314px" height="465px;" src="{:U('Setting/diyview')}"></iframe> 
		</div>
        
        
		<div class="website_page">
            <a href="#" class="photo" ><img src="com_statics/images/icon10.gif" alt="图片描述" /></a>
            <strong>热门岗位</strong>
            <p>罗列企业急招的热门岗位</p>
            <span class="btn_add">
				<php>if(in_array(10,$tool)){</php>
					已添加 <a href="javascript:void(0)" class="esc_tool" data-index="10">取消</a>
				<php>}else{</php>
					<a href="javascript:void(0)" class="add_tool" data-index="10">+ 添加</a>
				<php>}</php>
			</span>
		</div>
        
		<div class="website_page">
            <a href="#" class="photo" ><img src="com_statics/images/icon11.gif" alt="图片描述" /></a>
            <strong>留言互动</strong>
            <p>与求职者深入沟通互动!</p>
            <span class="btn_add">
				<php>if(in_array(11,$tool)){</php>
					已添加 <a href="javascript:void(0)" class="esc_tool" data-index="11">取消</a>
				<php>}else{</php>
					<a href="javascript:void(0)" class="add_tool" data-index="11">+ 添加</a>
				<php>}</php>
			</span>
		</div>
		<div class="website_page">
			<a href="#" class="photo" ><img src="com_statics/images/icon12.gif" alt="图片描述" /></a>
			<strong>问卷调查</strong>
			<p>为企业做决策提供数据支持!</p>
			<span class="btn_add">
				<php>if(in_array(12,$tool)){</php>
					已添加 <a href="javascript:void(0)" class="esc_tool" data-index="12">取消</a>
				<php>}else{</php>
					<a href="javascript:void(0)" class="add_tool" data-index="12">+ 添加</a>
				<php>}</php>
			</span>
		</div>
		<!--<div class="website_page">
		<a href="#" class="photo" ><img src="com_statics/images/icon13.gif" alt="图片描述" /></a>
		<strong>预约面试</strong>
		<p>自由安排面试时间！</p>
		<a href="#" class="btn_add">+ 添加</a>
		</div>-->
		<div class="website_page">
			<a href="#" class="photo" ><img src="com_statics/images/icon14.gif" alt="图片描述" /></a>
			<strong>公司介绍</strong>
			<p>向求职者展示公司介绍！</p>
			<span class="btn_add">
				<php>if(in_array(14,$tool)){</php>
					已添加 <a href="javascript:void(0)" class="esc_tool" data-index="14">取消</a>
				<php>}else{</php>
					<a href="javascript:void(0)" class="add_tool" data-index="14">+ 添加</a>
				<php>}</php>
			</span>
		</div>
		<div class="website_page">
			<a href="#" class="photo" ><img src="com_statics/images/icon15.gif" alt="图片描述" /></a>
			<strong>联系我们</strong>
			<p>向求职者提供企业联系电话</p>
			<span class="btn_add">
				<php>if(in_array(15,$tool)){</php>
					已添加 <a href="javascript:void(0)" class="esc_tool" data-index="15">取消</a>
				<php>}else{</php>
					<a href="javascript:void(0)" class="add_tool" data-index="15">+ 添加</a>
				<php>}</php>
			</span>
		</div>
        <span class="clear"></span>
		<div class="upload_">
                <div class="upload_logo">
                    <h3>上传公司LOGO</h3>
                    <p>小技巧：想跟背景图融为一体，尽量使用PNG格式</p>
					<form name="form" method="post" id="upload_logo_form" action="{:U('Setting/set_company_diylogo')}" enctype="multipart/form-data">
						<input type="file" id="upload_logo" name="fileToUpload" style="display:none">
						<a href="javascript:void(0)" class="btn_upload upload_logo_btn">上传</a>
					</form>
                </div>
                <div class="upload_bg">
                    <h3>上传背景图片</h3>
                    <p>小技巧：图片不能太大，不然打开速度会很慢哦。</p>
					<form name="form" method="post" id="upload_bg_form" action="{:U('Setting/set_company_diybg')}" enctype="multipart/form-data">
						<input type="file" id="upload_bg" name="fileToUpload" style="display:none">
						<a href="javascript:void(0)" class="btn_upload upload_bg_btn">上传</a>
					</form>
                </div>
		</div>
		<div class="diy_style">
			<h3>选择微官网风格</h3>
			<ul>
				<li><a href="javascript:void(0)" id="green" class="setstyle"><img src="com_statics/diystyle/image/skin1.png" alt="skin" title="skin" /></a></li>
				<li><a href="javascript:void(0)" id="metro" class="setstyle"><img src="com_statics/diystyle/image/skin2.png" alt="skin" title="skin" /></a></li>
				<li><a href="javascript:void(0)" id="beauty" class="setstyle"><img src="com_statics/diystyle/image/skin3.png" alt="skin" title="skin" /></a></li>
				<li><a href="javascript:void(0)" id="black" class="setstyle"><img src="com_statics/diystyle/image/skin6.png" alt="skin" title="skin" /></a></li>
				<li><a href="javascript:void(0)" id="restaurant" class="setstyle"><img src="com_statics/diystyle/image/skin8.png" alt="skin" title="skin" /></a></li>
				<li><a href="javascript:void(0)" id="medical" class="setstyle"><img src="com_statics/diystyle/image/skin9.png" alt="skin" title="skin" /></a></li>
				<li><a href="javascript:void(0)" id="personal" class="setstyle"><img src="com_statics/diystyle/image/skin10.png" alt="skin" title="skin" /></a></li>
			</ul>
		</div>
	</div>
	<!-- DIY_website结束 -->
	</div>
	<!-- neirong结束 -->
	<span class="clear"></span>
	<!-- 清除浮动 -->
</div>
<!-- container结束 -->
<script>
$(document).ready(function(){
	var diy = "{$diy_portal}";
	var u = ""
	if(diy != 1){
		show_err_msg('您尚未开通DIY微官网功能，请联系我们！',1);
		return false;
	}
	$(".setstyle").click(function(){
		style = $(this).attr('id');
		$.post('__URL__/set_company_diystyle',{style:style},function(res){
			alert(res.info)
			if(res.status){
				window.location.reload();
			}
		},'json');
	});
	$(".upload_bg_btn").click(function(){
		$("#upload_bg").click();
	});
	$("#upload_bg").live('change',function(){
		if($(this).val()!=''){
			$("#upload_bg_form").submit();
		}
	});
	$(".upload_logo_btn").click(function(){
		$("#upload_logo").click();
	});
	$("#upload_logo").live('change',function(){
		if($(this).val()!=''){
			$("#upload_logo_form").submit();
		}
	});
	$(".add_tool").click(function(){
		toolid = $(this).attr('data-index');
		$.post('__URL__/set_company_diytool',{toolid:toolid},function(res){
			if(res.status){
				window.location.reload();
			}else{
				alert(res.info);
			}
		},'json');
	});
	$(".esc_tool").click(function(){
		toolid = $(this).attr('data-index');
		$.post('__URL__/esc_company_diytool',{toolid:toolid},function(res){
			if(res.status){
				window.location.reload();
			}else{
				alert(res.info);
			}
		},'json');
	});
});
</script>
<include file="Public:bottom" />